package com.healer.springcloud.service.Impl;

import com.healer.springcloud.mapper.DepartmentMapper;
import com.healer.springcloud.pojo.Department;
import com.healer.springcloud.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartmentServiceImpl implements DepartmentService {
    @Autowired
    DepartmentMapper departmentMapper;
    @Override
    public boolean addDepartment(String name) {
        return departmentMapper.addDepartment(name);
    }

    @Override
    public Department queryDepartmentById(long id) {
        return departmentMapper.queryDepartmentById(id);
    }

    @Override
    public List<Department> queryDepartment() {
        return departmentMapper.queryDepartment();
    }
}
